<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1.0, maximum-scale=1, user-scalable=no" charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/pc/css/media.css"/>
    <link rel="stylesheet" type="text/css" href="/pc/css/common.css"/>


    <title>专属云</title>
    <link href="/pc/css/mui.picker.css" rel="stylesheet" />
    <link href="/pc/css/mui.poppicker.css" rel="stylesheet" />
    <#--<link rel="stylesheet" type="text/css" href="/pc/css/index.css"/>-->

    <script src="//do.yunzhijia.com/pub/js/qingjs.js"></script>
    <link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="//cdn.bootcss.com/bootstrap-slider/9.4.1/css/bootstrap-slider.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/pc/css/index.css"/>
    <script src="/pc/js/jquery-3.0.0.min.js"></script>
    <script src="/layer/layer.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap-slider/9.4.1/bootstrap-slider.min.js"></script>
</head>
<body style="background: #eaeff3";>
<div class="main_div">
    <div class="main_body" style=" height: 1220px;">
        <input type="hidden" name="openId" id="openId" value="${openId}">
        <p class="topTip_p">专属云产品有计算独享与存储独享两种套餐，请按需查询，客户经理折扣为6折。</p>
        <div class="listing">
            <div class="order_details">
                <ul>
                    <li class="fortab prepaids checked" value="1">计算独享</li>
                    <li class="fortab prepaids2" value="0">计算存储独享</li>
                </ul>
            </div>
            <div>
                <div class="tablelist showdomdiv showsss">
                    <div class="items">
                        <div class="item">
                            <div class="iconDiv"><i>
                                <img src="/pc/image/zhuanshuyun.png" width="20px"; height="15px">
                            </i></div>
                            <h4 class="title">计算独享</h4>
                            <#--计算单元-->
                            <ul class="config_ul">
                                <p class="config_ul_title">计算单元</p>
                                <li id='showGuiGePicker'>
                                    <span class="left" id="guiGe">规格1</span>
                                    <div class ="right_Div"  >
                                    <span class="left one one_style" id='userResult'>36C/321GB </span>                                                    <i class="_icon_zsy left" >
                                            <img src="/pc/image/go_right.png">
                                        </i>
                                    </div>

                                </li>
                            </ul>
                            <#--带宽-->
                            <ul class="config2_ul" id="list_brand_one">
                                <p class="config_ul_title">带宽</p>
                                <li>
                                    <div class=" left huahua" style="width: 46%;">
                                        <!--滚动条框-->
                                        <input id="ex1" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="300" data-slider-step="10" data-slider-value="0" value="0"/>
                                    </div>
                                    <div class="_config_div wid35 left zhuiRou net_kd">
                                        <div class="stat_minus minus1"><i><img src="/pc/image/Group_MINUS.png"></i>
                                        </div>
                                        <input type="tel" pattern="[0-9]*" maxlength="4" id="statnumone" class="stat_num input_bg1 zhou brand_slider_num_one" value="1">
                                        <div class="stat_plus plus1"><i><img src="/pc/image/Group_PLUS.png"></i></div>
                                    </div>
                                </li>
                            </ul>
                            <#--存储单元-->
                            <ul class="config2_ul" id="list">
                                <p class="config_ul_title">存储单元</p>
                                <li id='showCunChuPicker' class="cunChuOne" data-stat="1">
                                    <span class="left addCunChuName" id="CunChu">SATA基础包</span>
                                    <div class ="right_Div"  >
                                        <span class="left one one_style" id='userCunChuResult'>1000G </span>                                                    <i class="_icon_zsy left" >
                                        <img src="/pc/image/go_right.png">
                                    </i>
                                    </div>
                                </li>
                                <li data-num="1">
                                    <div class="_config_div left add" id="showStoragePicker">
                                        <span class="left left_add_cont  diejiabao" id="storageResultLeft">SATA叠加包 500G</span>
                                        <#--<i class="right"><img src="/pc/image/go_right.png" ></i>-->
                                    </div>

                                    <div class="_config_div wid35 left zhuiRou net_kd">
                                        <div class="stat_minus minus1">
                                            <i><img src="/pc/image/Group_MINUS.png"></i>
                                        </div>
                                        <input type="tel" pattern="[0-9]*" maxlength="4" id="statnumone" class="stat_num input_bg1 zhou " value="1">
                                        <div class="stat_plus plus1">
                                            <i><img src="/pc/image/Group_PLUS.png"></i>
                                        </div>

                                    </div>

                                </li>
                                <li class="addConfig">
                                    <i><img src="/pc/image/Group_PLUS.png"></i>
                                </li>
                            </ul>

                        </div>
                        <div class="summary_div">
                            <ul class="configInfo_ul left">
                                <li style="width: 216px;"><span id = "guige_type_top_name">SATA基础包</span>
                                </li>
                                <li><span id="guige_count_one" value="1">36C/321GB </span></li>
                                <li>带宽<span id = "guige_band_one" value="1">0</span>M</li>
                            </ul>
                            <p class="price_p_zsy right " id="cpu_price">16300.00</p>
                        </div>
                    </div>
                </div>
                <div class="tablelist hidedomdiv showsss">
                    <div class="items">
                        <div class="item">
                            <div class="iconDiv"><i>
                                <img src="/pc/image/zhuanshuyun.png" width="20px"; height="15px">
                            </i></div>
                            <h4 class="title">计算存储独享</h4>
                            <ul class="config_ul">
                                <p class="config_ul_title">计算单元</p>
                                <li id="showGuiGePicker2">
                                    <span class="left" id="Guige_T">规格1</span>
                                    <div class ="right_Div">
                                        <span class="left one one_style" id='userResult2'>36C/321GB </span>                <i class="_icon_zsy left" >
                                        <img src="/pc/image/go_right.png">
                                    </i>
                                    </div>

                                </li>
                            </ul>
                            <ul class="config2_ul" id="list_brand_two">
                                <p class="config_ul_title">带宽</p>
                                <li>
                                    <div class=" left huahua" style="width: 46%;">
                                        <!--滚动条框-->
                                        <input id="ex2" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="300" data-slider-step="10" data-slider-value="0" value="0"/>
                                    </div>
                                    <div class="_config_div wid35 left zhuiRou net_kd">
                                        <div class="stat_minus minus1"><i><img src="/pc/image/Group_MINUS.png"></i>
                                        </div>
                                        <input type="tel" pattern="[0-9]*" maxlength="4" id="statnumtwo" class="stat_num input_bg1 zhou  brand_slider_num_two" value="0">
                                        <div class="stat_plus plus1"><i><img src="/pc/image/Group_PLUS.png"></i></div>
                                    </div>
                                </li>
                            </ul>
                            <ul class="config2_ul" id="listtwo">
                                <p class="config_ul_title">存储单元</p>
                                <li id='showCunChuPickerTwo' class="cunChuOne" data-stat="1">
                                    <span class="left addCunChuName2" id="CunChuTwo" value="1">SATA基础包 </span>
                                    <div class ="right_Div"  >
                                        <span class="left one one_style" id='userCunChuResultTwo'>57.2TB</span>                                                    <i class="_icon_zsy left" >
                                        <img src="/pc/image/go_right.png">
                                    </i>
                                    </div>
                                </li>

                                <li data-num-two="1">
                                    <div class="_config_div left add" id="showStoragePicker" style=" width: 52%;">
                                        <span class="left left_add_cont_two  diejiabaoTwo" id="storageResultLeftTwo" >SATA叠加包</span><i class="right"><img src="/pc/image/go_right.png" ></i>
                                    </div>

                                    <div class="_config_div wid35 left zhuiRou net_kd">
                                        <div class="stat_minus minus1">
                                            <i><img src="/pc/image/Group_MINUS.png"></i>
                                        </div>
                                        <input type="tel" pattern="[0-9]*" maxlength="4" id="statnumone" class="stat_num input_bg1 zhou " value="1">
                                        <div class="stat_plus plus1">
                                            <i><img src="/pc/image/Group_PLUS.png"></i>
                                        </div>

                                    </div>

                                </li>
                                <li class="addConfigTwo">
                                    <i><img src="/pc/image/Group_PLUS.png"></i>
                                </li>
                            </ul>

                        </div>
                        <div class="summary_div">
                            <ul class="configInfo_ul left">
                                <li style="width: 270px;"><span id = "guige_type_two_name">SATA基础包 </span>
                                    <#--<span id = "guige_type_two_count">1000GB</span>-->
                                </li>
                                <li><span id="guige_count_two">36C/321GB </span></li>
                                <li>带宽<span id = "guige_band_two">0</span>M</li>
                            </ul>
                            <p class="price_p_zsy right " id="cpu_price_two">￥53</p>
                        </div>
                    </div>
                </div>
            </div>











        </div>
    </div>
</div>

<#include "foot.ftl">

    <input type="hidden" id="total_guige_one" name="total_guige_one" value="15894">
    <input type="hidden" id="total_stat_one" name="total_stat_one" value="0">
    <input type="hidden" id="total_brand_one" name="total_brand_one" value="0">


<#--//存储-->
    <input type="hidden" id="total_guige_two" name="total_guige_two" value="15894">
    <input type="hidden" id="total_stat_two" name="total_stat_two" value="35000">
    <input type="hidden" id="total_brand_two" name="total_brand_two" value="0">

<#--//带宽-->
    <input type="hidden" id="total_brand_t" name="total_brand_t" value="0">
    <input type="hidden" id="total_brand_a" name="total_brand_a" value="0">
    <input type="hidden" id="total_brand_d" name="total_brand_d" value="40">
    <input type="hidden" id="tx_sata_tag" name="tx_sata_tag" value="0">

    <input type="hidden" name="flag" id="flag" value="0">
    <input type="hidden" name="flagNum" id="flagNum" value="0">
    <input type="hidden" name="flag_die" id="flag_die" value="1">
    <input type="hidden" name="flag_die_flag" id="flag_die_flag" value="1">
    <input type="hidden" name="title" id="title" value="${title}">
    <input type="hidden" id = "guige_type_one_name" value="SATA基础包">
    <input type="hidden" id = "guige_type_one_count" value="1000GB">

<#-- ------------------------------------------------>
<input type="hidden" name="cunchudanone" id="cunchudanone" value="300">
<input type="hidden" name="cunchudantwo" id="cunchudantwo" value="0">
<input type="hidden" name="cunchudanthree" id="cunchudanthree" value="0">

<input type="hidden" name="cunchudanonechild" id="cunchudanonechild" value="150">
<input type="hidden" name="cunchudantwochild" id="cunchudantwochild" value="0">
<input type="hidden" name="cunchudanthreechild" id="cunchudanthreechild" value="0">



<#-- ------------------------------------------------>
<input type="hidden" name="cunchurightone" id="cunchurightone" value="35000">
<input type="hidden" name="cunchurighttwo" id="cunchurighttwo" value="0">
<input type="hidden" name="cunchurightthree" id="cunchurightthree" value="0">
<input type="hidden" name="cunchurightfore" id="cunchurightfore" value="0">
<input type="hidden" name="cunchurightfive" id="cunchurightfive" value="0">

<input type="hidden" name="cunchurightonechild" id="cunchurightonechild" value="8800">
<input type="hidden" name="cunchurighttwochild" id="cunchurighttwochild" value="0">
<input type="hidden" name="cunchurightthreechild" id="cunchurightthreechild" value="0">
<input type="hidden" name="cunchurightforechild" id="cunchurightforechild" value="0">
<input type="hidden" name="cunchurightfivechild" id="cunchurightfivechild" value="0">
</div>
<script src="/pc/js/mui.min.js"></script>
<script src="/pc/js/mui.poppicker.js"></script>
<script src="/pc/js/mui.picker.min.js"></script>
<script src="/pc/js/yun_title.js"></script>
<script src="/pc/js/tab.js"></script>

<script>
    $(document).ready(function(){

        // 改为鼠标移上的事件只需把click改为mousemove

        $(".fortab").click(function(){
            var number=$(".fortab").index(this);
            $(this).addClass("checked");
            $(this).attr("value","1");
            $(this).siblings().removeClass("checked");
            $(this).siblings().attr("value","0");
            $(".tablelist:eq("+number+")").show();
            $(".tablelist:eq("+number+")").siblings().hide();
            getAllPrice();
        });
    });



</script>

<script>
    //用于生成uuid
    function S4() {
        return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
    };
    function guid() {
        return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
    };

    //删除的按钮事件
    mui(".config2_ul").on('tap', '.delet', function(event){
        var name=$(this).parent().attr("class");
        $("."+name).remove();

    });
    function count() {
        var array1=new Array();
        var array2=new Array();
        var array3=new Array();
        var x=0;
        var y=0;
        var z=0;

        $('#list li[data-stat]').each(function () {
            array1[x]=$(this).find(".addCunChuName").text();
            x++;

        });
        $('#list li[data-num]').each(function () {
            array2[y]=$(this).find(".diejiabao").text();
            y++;

        });
        $('#list li[data-num]').each(function () {
            array3[z]=$(this).find("input").val();
            z++;

        });

        $('#guige_type_top_name').text(getName0().toString());
        console.log(array1);
        console.log(array2);
        console.log(array3);
        //计算价格
        getstat_num_price(array1);
        getstat_addnum_price(array2,array3);
        //统计个数
        // $('.tatil_stat').html(getstat_name_count(stat_name));


    };
    function countTwo() {
        var arrayTwo1=new Array();
        var arrayTwo2=new Array();
        var arrayTwo3=new Array();
        var x=0;
        var y=0;
        var z=0;

        $('#listtwo li[data-stat]').each(function () {
            arrayTwo1[x]=$(this).find(".addCunChuName2").text();
            /*stat_num[index]=$(this).find("input").val();*/
            x++;

        });
        $('#listtwo li[data-num-two]').each(function () {
            arrayTwo2[y]=$(this).find(".diejiabaoTwo").text();
            y++;

        });
        $('#listtwo li[data-num-two]').each(function () {
            arrayTwo3[z]=$(this).find("input").val();
            z++;

        });
        $('#guige_type_two_name').text(getName2().toString());
        console.log(arrayTwo1);
        console.log(arrayTwo2);
        console.log(arrayTwo3);
        //计算价格
        getstat_numTwo_price(arrayTwo1);
        getstat_addTwonum_price(arrayTwo2,arrayTwo3);
        //统计个数
        // $('.tatil_stat').html(getstat_name_count(stat_name));


    };
    function getstat_addTwonum_price(array2,array3) {
        var cunchurightone=document.getElementById('cunchurightone');
        var cunchurighttwo=document.getElementById('cunchurighttwo');
        var cunchurightthree=document.getElementById('cunchurightthree');
        var cunchurightfore=document.getElementById('cunchurightfore');
        var cunchurightfive=document.getElementById('cunchurightfive');



        var cunchurightonechild=document.getElementById('cunchurightonechild');
        var cunchurighttwochild=document.getElementById('cunchurighttwochild');
        var cunchurightthreechild=document.getElementById('cunchurightthreechild');

        var cunchurightforechild=document.getElementById('cunchurightforechild');
        var cunchurightfivechild=document.getElementById('cunchurightfivechild');
        cunchurightone.value=0;
        cunchurighttwo.value=0;
        cunchurightthree.value=0;
        cunchurightfore.value=0;
        cunchurightfive.value=0;
        for(var i=0;i<array2.length;i++){



            if(array2[i].trim()=="SATA叠加包"){
                cunchurightonechild.value=array3[i]*8800;
                cunchurightone.value=35000;
            }

            if(array2[i].trim()=="SAS 叠加包规格1"||array2[i].trim()=="SAS叠加包规格1"){
                cunchurighttwochild.value=array3[i]*11000;
                cunchurighttwo.value=44500;
            }
            if(array2[i].trim()=="SAS 叠加包规格2"||array2[i].trim()=="SAS叠加包规格2"){
                cunchurightthreechild.value=array3[i]*16500;
                cunchurightthree.value=66500;
            }
            if(array2[i].trim()=="SSD 叠加包规格1"||array2[i].trim()=="SSD叠加包规格1"){
                cunchurightforechild.value=array3[i]*11500;
                cunchurightfore.value=45500;
            }
            if(array2[i].trim()=="SSD 叠加包规格2"||array2[i].trim()=="SSD叠加包规格2"){
                cunchurightfivechild.value=array3[i]*14000;
                cunchurightfive.value=56500;
            }


        }
        getAllPrice();
    };
    function getstat_numTwo_price(array1) {
        var cunchurightone=document.getElementById('cunchurightone');
        var cunchurighttwo=document.getElementById('cunchurighttwo');
        var cunchurightthree=document.getElementById('cunchurightthree');
        var cunchurightfore=document.getElementById('cunchurightfore');
        var cunchurightfive=document.getElementById('cunchurightfive');
        for(var i=0;i<array1.length;i++){
            if(array1[i].trim()=="SATA基础包"){
                cunchurightone.value=35000;
            }else if(array1[i].trim()=="SAS基础包规格1"){
                cunchurighttwo.value=44500;
            }else if(array1[i].trim()=="SAS基础包规格2"){
                cunchurightthree.value=66500;
            }
            else if(array1[i].trim()=="SSD基础包规格1"){
                cunchurightfore.value=45500;
            }
            else if(array1[i].trim()=="SSD基础包规格2"){
                cunchurightfive.value=56500;
            }
        }
        getAllPrice();

    }

    function getName0() {
        var arr=[];
        $('#list li[data-stat]').each(function () {
            arr.push($(this).find(".addCunChuName").text());
        });
        return arr;
    }
    function getName2() {
        var arr2=new Array();
        var index=0;
        $('#listtwo li[data-stat]').each(function () {
            arr2[index]=$(this).find(".addCunChuName2").text();
            /*stat_num[index]=$(this).find("input").val();*/
            index++;
        });

        return arr2;
    }

    function getName() {
        var array1=new Array();
        var index=0;
        $('#list li[data-stat]').each(function () {
            array1[index]=$(this).find(".addCunChuName").text();
            /*stat_num[index]=$(this).find("input").val();*/
            index++;
        });
        var array2=new Array("SATA基础包","SAS基础包","SSD基础包");
        var result = [];
        for(var i = 0; i < array2.length; i++){
            var obj = array2[i];
            var isExist = false;
            for(var j = 0; j < array1.length; j++){
                var aj = array1[j];
                if(aj == obj){
                    isExist = true;
                    break;
                }
            }
            if(!isExist){
                result.push(obj/*+"  100G"*/);
            }
        }
        return result;



    }
    function getNameTwo() {
        var arrayTwo=new Array();
        var index=0;
        $('#listtwo li[data-stat]').each(function () {
            arrayTwo[index]=$(this).find(".addCunChuName2").text().trim();
            /*stat_num[index]=$(this).find("input").val();*/
            index++;

        });
        var array2=new Array("SAS 基础包规格1","SAS 基础包规格2","SSD 基础包规格1","SSD 基础包规格2","SATA基础包");
        var result = [];
        for(var i = 0; i < array2.length; i++){
            var obj = array2[i];
            var isExist = false;
            for(var j = 0; j < arrayTwo.length; j++){
                var aj = arrayTwo[j];
                if(aj==obj){

                    isExist = true;
                    break;
                }
            }
            if(!isExist){
                if(obj=="SATA基础包"){
                    obj="SATA基础包     57.2TB";
                }
                if(obj=="SAS 基础包规格1"||obj=="SAS基础包规格1"){
                    obj="SAS 基础包规格1  36TB";
                }
                if(obj=="SAS 基础包规格2"||obj=="SAS基础包规格2"){
                    obj="SAS 基础包规格2   5TB";
                }
                if(obj=="SSD 基础包规格1"||obj=="SSD基础包规格1"){
                    obj="SSD 基础包规格1   14.8TB";
                }
                if(obj=="SSD 基础包规格2"||obj=="SSD基础包规格2"){
                    obj="SSD 基础包规格2   18.4TB";
                }
                result.push(obj);
            }
        }
        return result;



    }

    var index=1;
    //点击加号动态生成事件
    $(".addConfig").click(function(){
        var name0=getName0();
        var uuid = "zhu"+guid();
        console.log(uuid);

        /*var CunChu=document.getElementById('CunChu').text();*/
        if(index<=2){

            index++;
            var html = "";
            html=   '<li id="'+uuid+'" class="cunChuOne" data-stat="'+index+'">'+
                    '<span class="left  addCunChuName" id="CunChu'+uuid+'">'+getName()[0].substring(0,6)+'</span>'+
                    '<div class ="right_Div">'+
                    '<span class="left one one_style" id="result'+uuid+'">1000GB</span>'+
                    '<i class="_icon_zsy left" ><img src="/pc/image/go_right.png"></i>'+
                    '</div>'+
                    '</li>'+
                    '<li data-num="'+index+'">'+
                    '<div class="_config_div left add" id="showStoragePicker'+uuid+'">'+
                    '<span class="left left_add_cont diejiabao" id="storageResultLeft">'+getName()[0].substring(0,4)+'叠加包 500G</span>'+
                    '</div>'+
                    '<div class="_config_div wid35 left zhuiRou net_kd_zsy">'+
                    '<div class="stat_minus minus1"><i><img src="/pc/image/Group_MINUS.png"></i></div>'+
                    '<input type="tel" pattern="[0-9]*" maxlength="4" id="statnumone" class="stat_num input_bg1 zhou " value="1">'+
                    '<div class="stat_plus plus1"><i><img src="/pc/image/Group_PLUS.png"></i></div></div>'+
                    '<div class="delet right del_right" style="display: none"><img src="/pc/image/Shape.png"></div>'+
                    '</li>';

            $(this).before(html);

            getPicker(uuid);
            count();
        }
        /*else if(index==2){
            $('.addConfig').css("display","none");
        }*/


        //生成选择框

        /*count();*!/*/
    });
    var indexTwo=1;
    $(".addConfigTwo").click(function(){
        var uuid = "zhu"+guid();
        console.log(uuid);

        /*var CunChu=document.getElementById('CunChu').text();*/
        if(indexTwo<=4){
            indexTwo++;
            var html = "";

            html='<li id="showCunChuPickerTwo'+uuid+'" class="cunChuOne" data-stat="'+indexTwo+'">'+
            '<span class="left addCunChuName2" id="CunChuTwo'+uuid+'" value="'+indexTwo+'">'+getNameTwo()[0].substring(0,10)+'</span>'+
            '<div class ="right_Div"  >'+
            '<span class="left one one_style" id="userCunChuResultTwo'+uuid+'">'+getNameTwo()[0].substring((getNameTwo()[0].length-6),(getNameTwo()[0].length))+'</span>'+
            '<i class="_icon_zsy left" ><img src="/pc/image/go_right.png"></i>'+
            '</div>'+' </li>'+
            ' <li data-num-two="1">'+
            '<div class="_config_div left add" id="showStoragePicker" style=" width: 52%;">'+
            '<span class="left left_add_cont_two  diejiabaoTwo" id="storageResultRight'+uuid+'">'+getNameTwo()[0].substring(0,4) +'叠加包规格1</span>'+
            '<i class="right"><img src="/pc/image/go_right.png" ></i>'+
            '</div>'+
            '<div class="_config_div wid35 left zhuiRou net_kd">'+
            '<div class="stat_minus minus1">'+
            '<i><img src="/pc/image/Group_MINUS.png"></i>'+
                    '</div>'+
            '<input type="tel" pattern="[0-9]*" maxlength="4" id="statnumone" class="stat_num input_bg1 zhou " value="1">'+
            '<div class="stat_plus plus1">'+
            '<i><img src="/pc/image/Group_PLUS.png"></i>'+
            '</div>'+
            ' </div>'+
            '</li>';
            $(this).before(html);

            getPickerOfLeft(uuid);
            countTwo();
            /*count();*!/*/
        }
        /*else if(index==2){
            $('.addConfig').css("display","none");
        }*/


        //生成选择框

        /*count();*!/*/
    });

    var storageAddOne  = new mui.PopPicker();

    var storageResultLeft = document.getElementById('storageResultLeftTwo');

    storageResultLeft.addEventListener('tap', function(event) {
        storageAddOne.show(function (items) {
            if(items[0].type=="undefined"||items[0].type==null){
                storageResultLeft.innerHTML="SATA叠加包";
            }
            else {
                storageResultLeft.innerHTML=items[0].type;
            }



        });
    });

    var storageOneTop  = new mui.PopPicker();
    var storageResultLeft = document.getElementById('storageResultLeftTwo');
    var showCunChuTwo = document.getElementById('showCunChuPickerTwo');
    var CunChu = document.getElementById('CunChuTwo');
    var userCunChuResult=document.getElementById('userCunChuResultTwo');
    showCunChuTwo.addEventListener('tap', function(event) {
        storageOneTop.setData(preparePickerDataTwo(null));
        storageOneTop.show(function (items) {
            CunChu.innerHTML=items[0].text;
            userCunChuResult.innerHTML=items[0].type;
            if(items[0].type=="36TB"){
                storageResultLeft.innerHTML="SAS 叠加包规格1";
                storageAddOne.setData([{value:11000,text:'SAS叠加包规格1:9TB',type:'SAS叠加包规格1',size:'9TB'},
                    {value:16500,text:'SAS叠加包规格2:13.5TB',type:'SAS叠加包规格2',size:'13.5TB'}]);
            }
            if(items[0].type=="5TB"){
                storageResultLeft.innerHTML="SAS 叠加包规格2";
                storageAddOne.setData([{value:11000,text:'SAS叠加包规格1:9TB',type:'SAS叠加包规格1',size:'9TB'},
                    {value:16500,text:'SAS叠加包规格2:13.5TB',type:'SAS叠加包规格2',size:'13.5TB'}]);
            }
            if(items[0].type=="57.2TB"){
                storageResultLeft.innerHTML="SATA叠加包";
                storageAddOne.setData([{value:8800,text:'SATA叠加包',type:'SATA叠加包',size:'14.3TB'}]);
            }
            if(items[0].type=="14.8TB"){
                storageResultLeft.innerHTML="SSD 叠加包规格1";
                storageAddOne.setData([{value:11500,text:'SSD叠加包规格1:3.7TB',type:'SSD叠加包规格1',size:'3.7TB'},
                    {value:14000,text:'SSD叠加包规格2:4.6TB',type:'SSD叠加包规格2',size:'4.6TB'}]);
            }
            if(items[0].type=="18.4TB"){
                storageResultLeft.innerHTML="SSD 叠加包规格2";
                storageAddOne.setData([{value:11500,text:'SSD叠加包规格1:3.7TB',type:'SSD叠加包规格1',size:'3.7TB'},
                    {value:14000,text:'SSD叠加包规格2:4.6TB',type:'SSD叠加包规格2',size:'4.6TB'}]);
            }
            countTwo();
        });
    });


    function getPickerOfLeft(uuid) {
        var storageAddTwo = "storyResult" + uuid;
        storageAddTwo  = new mui.PopPicker();
        var storage = "storytwo" + uuid;
        storage = new mui.PopPicker();
        var  storageResultRightTwo = document.getElementById('storageResultRight'+uuid);
        var showCunChuPickerTwo = document.getElementById('showCunChuPickerTwo'+uuid);
        var CunChuTwo = document.getElementById('CunChuTwo'+uuid);
        var userCunChuResultTwo=document.getElementById('userCunChuResultTwo'+uuid);
        showCunChuPickerTwo.addEventListener('tap', function(event) {

            storage.setData(preparePickerDataTwo(uuid));

            storage.show(function (items) {
                CunChuTwo.innerHTML=items[0].text;
                userCunChuResultTwo.innerHTML=items[0].type;
                if(items[0].type=="36TB"||items[0].type=="5TB"){
                    storageResultRightTwo.innerHTML="SAS 叠加包规格1";
                    storageAddTwo.setData([{value:11000,text:'SAS 叠加包规格1:9TB',type:'SAS叠加包规格1',size:'9TB'},
                        {value:16500,text:'SAS 叠加包规格2:13.5TB',type:'SAS叠加包规格2',size:'13.5TB'}]);
                }
                if(items[0].type=="57.2TB"){
                    storageResultRightTwo.innerHTML="SATA叠加包";
                    storageAddTwo.setData([{value:8800,text:'SATA叠加包',type:'SATA叠加包',size:'14.3TB'}]);
                }
                if(items[0].type=="14.8TB"||items[0].type=="18.4TB"){
                    storageResultRightTwo.innerHTML=" SSD叠加包规格1";
                    storageAddTwo.setData([{value:11500,text:'SSD 叠加包规格1:3.7TB',type:'SSD叠加包规格1',size:'3.7TB'},
                        {value:14000,text:'SSD 叠加包规格2:4.6TB',type:'SSD叠加包规格2',size:'4.6TB'}]);
                }

            });
        }, false);
       var text=storageResultRightTwo.innerHTML;
        if(text="SATA叠加包"){
            storageAddTwo.setData([{value:8800,text:'SATA叠加包',type:'SATA叠加包',size:'14.3TB'}]);
        }
        if(text="SAS叠加包"){
            storageAddTwo.setData([{value:11000,text:'SAS 叠加包规格1:9TB',type:'SAS叠加包规格1',size:'9TB'},
                {value:16500,text:'SAS 叠加包规格2:13.5TB',type:'SAS叠加包规格2',size:'13.5TB'}]);
        }
        if(text="SSD叠加包"){
            storageAddTwo.setData([{value:11500,text:'SSD 叠加包规格1:3.7TB',type:'SSD叠加包规格1',size:'3.7TB'},
                {value:14000,text:'SSD 叠加包规格2:4.6TB',type:'SSD叠加包规格2',size:'4.6TB'}]);
        }



        storageResultRightTwo.addEventListener('tap', function(event) {
            storageAddTwo.setData(['SATA叠加包']);
            storageAddTwo.show(function (items) {
                if(items[0].type=="undefined"||items[0].type==null){
                    storageResultRightTwo.innerHTML="SATA叠加包";
                }
                else {
                    storageResultRightTwo.innerHTML=items[0].type;
                }
            });
        }, false);







    }

    function preparePickerDataTwo(uuid) {
        var cunChuResult ;
        if (uuid){
            cunChuResult = document.getElementById('CunChuTwo'+uuid);
            /*cunChuResult=$(".CunChuTwo'+uuid+'").attr("value");*/
        }else{
            cunChuResult = document.getElementById('CunChuTwo');
        }

        var exsit=getName2();
        /*var self=cunChuResult.getAttribute("value");*/
        var self=cunChuResult.innerText;
        console.log("_+_++++++++++++++_+_+_+_+_+_");
        var date= [
            {nameType:'2',value:44500,text:'SAS 基础包规格1 ',type:'36TB',size:'规格1 36TB'},
            {nameType:'3',value:66500,text:'SAS 基础包规格2 ',type:'5TB',size:'规格2：5TB'},
            {nameType:'1',value:35000,text:'SATA基础包 ',type:'57.2TB',size:'57.2TB'},
            {nameType:'4',value:45500,text:'SSD 基础包规格1',type:'14.8TB',size:'14.8TB'},
            {nameType:'5',value:56500,text:'SSD 基础包规格2 ',type:'18.4TB',size:'18.4TB'}
        ];
        var excludes=exsit.filter(name=>name!=self);
        return date.filter(data => !excludes.includes(data.text));
    }




    function preparePickerData(uuid) {
        var cunChuResult ;
        if (uuid){
            cunChuResult = document.getElementById('CunChu'+uuid);
        }else{
            cunChuResult = document.getElementById('CunChu');
        }

        var exsit=getName0();
        var self=cunChuResult.innerText;
        var date= [
            {type:'SATA基础包',value:300,text:'SATA基础包 1000GB',cunchu:'SATA基础包',usecunchu:'1000GB'},
            {type:'SAS基础包',value:600,text:'SAS基础包  1000GB',cunchu:'SAS基础包',usecunchu:'1000GB'},
            {type:'SSD基础包',value:1200,text:'SSD基础包 1000GB',cunchu:'SSD基础包',usecunchu:'1000GB'}];
        var excludes=exsit.filter(name=>name!=self);
        return date.filter(data => !excludes.includes(data.type));
    }

    function getPicker(uuid) {
        var storage="story"+uuid;

        storage  = new mui.PopPicker();
        var showStoragePicker = document.getElementById(uuid);
        var storageResult = document.getElementById('result'+uuid);
        var cunChuResult = document.getElementById('CunChu'+uuid);
        var nextShowStorageResult=document.getElementById('showStoragePicker'+uuid);
        showStoragePicker.addEventListener('tap', function(event) {
            storage.setData(preparePickerData(uuid));
            storage.show(function (items) {
                cunChuResult.innerHTML=items[0].cunchu;
                storageResult.innerHTML=items[0].usecunchu;
                if(items[0].cunchu=='SATA基础包'){
                    nextShowStorageResult.innerHTML='SATA叠加包500GB';
                    /*cunChuAddPicker.setData([{value:150,text:'SATA叠加包',size:'500GB'}]);*/
                }
                else  if(items[0].cunchu=='SAS基础包'){
                    nextShowStorageResult.innerHTML='SAS叠加包500GB';
                    /*cunChuAddPicker.setData([{value:300,text:'SAS叠加包',size:'500GB'}]);*/
                }
                else if(items[0].cunchu=='SSD基础包'){
                    nextShowStorageResult.innerHTML='SSD叠加包500GB';
                    /*cunChuAddPicker.setData([{value:600,text:'SSD叠加包',size:'500GB'}]);*/
                }

            });
        }, false);
    }






    //滚动条触发函数，滚动条用的是bootstrap插件
    var sliders = new Slider('#ex1', {
        formatter: function(value) {

            $("#guige_band_one").text(value);
            $('.brand_slider_num_one').text(value);
            $('.brand_slider_num_one').val(value);
            $("#ex1").attr("value",value);
            $('.brand_price').text("￥"+value*40);
            count_one(value);
            /*brand_price(value);
            getAllPrice();*!/*/
        }
    });

    var sliders2 = new Slider('#ex2', {
        formatter: function(value) {
            $("#guige_band_two").text(value);
            $('.brand_slider_num_two').text(value);
            $('.brand_slider_num_two').val(value);
            $("#ex2").attr("value",value);
            $('.brand_price').text("￥"+value*40);
            count_two(value);
        }
    });




    (function($, doc) {
        $.init();
        $.ready(function() {
            var guiGePicker = new $.PopPicker();
            guiGePicker.setData(
                    [{value:15894,text:'36C/321GB'},
                        {value:19056,text:'44C/380GB'}
                    ]
            );
            var showGuiGePickerButton = doc.getElementById('showGuiGePicker');
            var userResult = doc.getElementById('userResult');
            var guige_count_one=doc.getElementById('guige_count_one');
            var guiGe= doc.getElementById("guiGe");
            getOnePrice();
            var total_guige_one=doc.getElementById('total_guige_one');
            showGuiGePickerButton.addEventListener('tap', function(event) {
                guiGePicker.show(function(items) {
                    total_guige_one.value=items[0].value;
                    userResult.innerText = items[0].text;
                    guige_count_one.innerHTML=items[0].text;
                    if(items[0].text=="36C/321GB"){
                        guiGe.innerText="规格1";
                    }
                    else {
                        guiGe.innerText="规格2";
                    }
                    getOnePrice();
                });
            }, false);

            //存储单元计算规则
            var cunChuAddPicker=new $.PopPicker();
            var cunChuPicker = new $.PopPicker();
            var showCunChuPickerButton = doc.getElementById('showCunChuPicker');
            var CunChu = doc.getElementById('CunChu');
            var userCunChuResult=doc.getElementById('userCunChuResult');
            var guiGe= doc.getElementById("guiGe");
            /*getOnePrice();*/
            var cunChuResultLeft=doc.getElementById('storageResultLeft');
            showCunChuPickerButton.addEventListener('tap', function(event) {

                cunChuPicker.setData(preparePickerData(null));

                cunChuPicker.show(function(items) {
                    CunChu.innerHTML=items[0].cunchu;
                    userCunChuResult.innerText = items[0].usecunchu;
                    if(items[0].cunchu=='SATA基础包'){
                        cunChuResultLeft.innerHTML='SATA叠加包500GB';
                        /*cunChuAddPicker.setData([{value:150,text:'SATA叠加包',size:'500GB'}]);*/
                    }
                    else  if(items[0].cunchu=='SAS基础包'){
                        cunChuResultLeft.innerHTML='SAS叠加包500GB';
                        /*cunChuAddPicker.setData([{value:300,text:'SAS叠加包',size:'500GB'}]);*/
                    }
                    else if(items[0].cunchu=='SSD基础包'){
                        cunChuResultLeft.innerHTML='SSD叠加包500GB';
                        /*cunChuAddPicker.setData([{value:600,text:'SSD叠加包',size:'500GB'}]);*/
                    }

                });
            }, false);


            /*第二个页面逻辑*/


            var guiGePicker2 = new $.PopPicker();
            guiGePicker2.setData(
                    [
                        {value:15894,text:'36C/321GB'},
                        {value:19056,text:'44C/380GB'}
                    ]);
            var showGuiGePickerButton2 = doc.getElementById('showGuiGePicker2');
            var userResult2 = doc.getElementById('userResult2');
            var guige_count_two=doc.getElementById('guige_count_two');
            var Guige2= doc.getElementById("Guige_T");
            var total_guige_two=doc.getElementById('total_guige_two');
            showGuiGePickerButton2.addEventListener('tap', function(event) {
                guiGePicker2.show(function(items) {
                    total_guige_two.value=items[0].value;
                    userResult2.innerText = items[0].text;
                    guige_count_two.innerHTML=items[0].text;
                    if(items[0].text=="36C/321GB"){
                        Guige2.innerText="规格1";
                    }
                    else {
                        Guige2.innerText="规格2";
                    }
                    getOnePrice();
                });
            }, false);

        });
    })(mui, document);
    $('#list_brand_one').on("blur",'.stat_num',function (event) {
        var stat_num = parseInt($(this).val());
        var  guige_band_one=document.getElementById('guige_band_one');
        if(isNaN(stat_num)){
            stat_num=1;
            $('#statnumone').text(stat_num);
            guige_band_one.innerHTML=stat_num.toString();
            count_one(stat_num);
            sliders.setValue(stat_num);
        }
        if(stat_num<0||stat_num==""){
            $(this).val(1);
            $('#statnumone').text(stat_num);
            guige_band_one.innerHTML=stat_num.toString();
            //$('.stat_num')
            /*count();*/
            //计算滚动条
            count_one(stat_num);
            sliders.setValue(stat_num);
        }
        else if(stat_num>=300){
            $(this).val(300);
            $('#statnumone').text(stat_num);
            guige_band_one.innerHTML=stat_num.toString();
            count_one(stat_num);
            sliders.setValue(stat_num);
        }
        else {
            $(this).val(stat_num);
            $('#statnumone').text(stat_num);
            guige_band_one.innerHTML=stat_num.toString();
            sliders.setValue(stat_num);
            count_one(stat_num);
        }
    });
    $('#list_brand_one').on('click','.stat_plus',function (event) {
        console.dir(this);
        var numInput = $(this).prev();
        var num=parseInt(numInput.val());
        var guige_band_one=document.getElementById('guige_band_one');
        if(num>=300){
            numInput.val(300);
            $('#statnumone').text(num);
            guige_band_one.innerHTML=num.toString();
            count_one(num);
            sliders.setValue(num);
        }
        else {
            num=num+1;
            numInput.val(num);
            $('#statnumone').text(num);
            guige_band_one.innerHTML=num.toString();
            count_one(num);
            sliders.setValue(num);
        }
    });
    $('#list_brand_one').on('click','.stat_minus',function (event) {
        console.dir(this);
        var numInput = $(this).next();
        var num=parseInt(numInput.val());
        var guige_band_one=document.getElementById('guige_band_one');
        if(num<=1){
            numInput.val(1);
            $('#statnumone').text(num);
            count_one(num);
            guige_band_one.innerHTML=num.toString();
            sliders.setValue(num);
        }
        else {
            num=num-1;
            numInput.val(num);
            $('#statnumone').text(num);
            guige_band_one.innerHTML=num.toString();
            count_one(num);
            /*guige_band_one.text(num.toString());*/
            sliders.setValue(num);
        }
    });
    $('#list_brand_two').on("blur",'.stat_num',function (event) {
        var num = parseInt($(this).val());
        var  guige_band_two=document.getElementById('guige_band_two');
        if(isNaN(num)){
            num=1;
            $('#statnumtwo').text(num);
            guige_band_two.innerHTML=num.toString();
            count_two(num);
        }
        if(num<0||num==""){
            $(this).val(1);
            //$('.stat_num')
            /*count();*/
            //计算滚动条
            $('#statnumtwo').text(num);
            guige_band_two.innerHTML=num.toString();
            count_two(num);
            sliders2.setValue(num);
        }
        else if(num>=300){
            $(this).val(300);
            /*count();*/
            //计算滚动条
            $('#statnumtwo').text(num);
            guige_band_two.innerHTML=num.toString();
            count_two(num);
            sliders2.setValue(num);
        }
        else {
            $(this).val(num);
            /*count();*/
            //计算滚动条
            $('#statnumtwo').text(num);
            guige_band_two.innerHTML=num.toString();
            count_two(num);
            sliders2.setValue(num);
        }
    });
    $('#list_brand_two').on('click','.stat_plus',function (event) {
        console.dir(this);
        var numInput = $(this).prev();
        var num=parseInt(numInput.val());
        var  guige_band_two=document.getElementById('guige_band_two');
        if(num>=300){
            numInput.val(300);
            /*count();*/
            //计算滚动条
            $('#statnumtwo').text(num);
            guige_band_two.innerHTML=num.toString();
            count_two(num);
            sliders2.setValue(num);
        }
        else {
            num=num+1;
            numInput.val(num);
            guige_band_two.innerHTML=num.toString();
            /*count();*/
            //计算滚动条
            $('#statnumtwo').text(num);
            count_two(num);
            sliders2.setValue(num);
        }
    });
    $('#list_brand_two').on('click','.stat_minus',function (event) {
        console.dir(this);
        var numInput = $(this).next();
        var num=parseInt(numInput.val());
        var  guige_band_two=document.getElementById('guige_band_two');
        if(num<=1){
            numInput.val(1);
            /*count();*///计算滚动条
            $('#statnumtwo').text(num);
            guige_band_two.innerHTML=num.toString();
            count_two(num);
            sliders2.setValue(num);
        }
        else {
            num=num-1;
            numInput.val(num);
            guige_band_two.innerHTML=num.toString();
            /*count();*/
            //计算滚动条
            $('#statnumtwo').text(num);
            count_two(num);
            sliders2.setValue(num);
        }
    });
    $('#list').on("blur",'.stat_num',function (event) {
        var num = parseInt($(this).val());
        if(isNaN(num)){
            num=1;
        }
        if(num<0||num==""){
            $(this).val(1);
            //$('.stat_num')
            count();
        }
        else if(num>=2000){
            $(this).val(2000);
            count();
        }
        else {
            $(this).val(num);
            count();
        }
    });
    $('#list').on('click','.stat_plus',function (event) {
        console.dir(this);
        var numInput = $(this).prev();
        var stat_num=parseInt(numInput.val());
        if(stat_num>=2000){
            numInput.val(2000);
            count();
        }
        else {
            stat_num=stat_num+1;
            numInput.val(stat_num);
            count();
        }
    });
    $('#list').on('click','.stat_minus',function (event) {
        console.dir(this);
        var numInput = $(this).next();
        var stat_num=parseInt(numInput.val());
        if(stat_num<=1){
            numInput.val(1);
            count();
        }
        else {
            stat_num=stat_num-1;
            numInput.val(stat_num);
            count();
        }
    });

    $('#listtwo').on("blur",'.stat_num',function (event) {
        var num = parseInt($(this).val());
        if(isNaN(num)){
            num=1;
        }
        if(num<0||num==""){
            $(this).val(1);
            //$('.stat_num')
            countTwo();
        }
        else if(num>=2000){
            $(this).val(2000);
            countTwo();
        }
        else {
            $(this).val(num);
            countTwo();
        }
    });
    $('#listtwo').on('click','.stat_plus',function (event) {
        console.dir(this);
        var numInput = $(this).prev();
        var stat_num=parseInt(numInput.val());
        if(stat_num>=2000){
            numInput.val(2000);
            countTwo();
        }
        else {
            stat_num=stat_num+1;
            numInput.val(stat_num);
            countTwo();
        }
    });
    $('#listtwo').on('click','.stat_minus',function (event) {
        console.dir(this);
        var numInput = $(this).next();
        var stat_num=parseInt(numInput.val());
        if(stat_num<=1){
            numInput.val(1);
            countTwo();
        }
        else {
            stat_num=stat_num-1;
            numInput.val(stat_num);
            countTwo();
        }
    });
    function getstat_addnum_price(array2,array3) {
        var cunchudanonechild=document.getElementById('cunchudanonechild');
        var cunchudantwochild=document.getElementById('cunchudantwochild');
        var cunchudanthreechild=document.getElementById('cunchudanthreechild');
        for(var i=0;i<array2.length;i++){
                if(array2[i].trim()=="SATA叠加包 500G"){
                    cunchudanonechild.value=array3[i]*150;
                }

                if(array2[i].trim()=="SAS基叠加包 500G"){
                    cunchudantwochild.value=array3[i]*300;
                }
                if(array2[i].trim()=="SSD基叠加包 500G"){
                    cunchudanthreechild.value=array3[i]*600;
                }
        }
        getAllPrice();
    };
    function getstat_num_price(array1) {
        var cunchudanone=document.getElementById('cunchudanone');
        var cunchudantwo=document.getElementById('cunchudantwo');
        var cunchudanthree=document.getElementById('cunchudanthree');
        for(var i=0;i<array1.length;i++){
            if(array1[i].trim()=="SATA基础包"){
                cunchudanone.value=300;
            }else if(array1[i].trim()=="SAS基础包"){
                cunchudantwo.value=600;
            }else if(array1[i].trim()=="SSD基础包"){
                cunchudanthree.value=1200;
            }
        }
        getAllPrice();

    }
    function  count_one(num) {
        var total_brand_d=document.getElementById('total_brand_d');
        total_brand_d.value=num*40;
        getOnePrice();

    };
    function  count_two(num) {
        var total_brand_a=document.getElementById('total_brand_a');
        total_brand_a.value=num*40;
        getTwoPrice();

    };
    function  getOnePrice() {
        var totalPrice=0;
        var total_guige_one=document.getElementById('total_guige_one');
        var price=parseFloat(total_guige_one.value);
        var total_brand_d=document.getElementById('total_brand_d');
        var onePrice=parseFloat(total_brand_d.value);
        var guige_type_one_name=$('#guige_type_one_name').val();
        var guige_type_one_count=$('#guige_type_one_count').val();

        var total_stat_one=document.getElementById('total_stat_one');
        if(guige_type_one_name=="SATA基础包"&&guige_type_one_count=="1000GB"){
            total_stat_one.value=300;
        }
        if(guige_type_one_name=="SATA基础包"&&guige_type_one_count=="500GB"){
            total_stat_one.value=150;
        }
        if(guige_type_one_name=="SAS基础包"&&guige_type_one_count=="500GB"){
            total_stat_one.value=300;
        }
        if(guige_type_one_name=="SAS基础包"&&guige_type_one_count=="1000GB"){
            total_stat_one.value=600;
        }if(guige_type_one_name=="SSD基础包"&&guige_type_one_count=="500GB"){
            total_stat_one.value=600;
        }if(guige_type_one_name=="SSD基础包"&&guige_type_one_count=="1000GB"){
            total_stat_one.value=1200;
        }
        var total_stat_one=parseFloat(total_stat_one.value);



        totalPrice=price+onePrice+total_stat_one;
        $("#cpu_price").text(totalPrice.toFixed(2));
        getAllPrice();
    }
    function  getTwoPrice() {

        var totalPrice=0;
        var total_guige_two=document.getElementById('total_guige_two');
        var price=parseFloat(total_guige_two.value);
        var total_stat_two=document.getElementById('total_stat_two');
        var onePrice=parseFloat(total_stat_two.value);
        var total_brand_a=document.getElementById('total_brand_a');
        var brandprice=parseFloat(total_brand_a.value);
        totalPrice=price+onePrice+brandprice;
        $("#cpu_price_two").text(totalPrice.toFixed(2));
        getAllPrice();
    }
    function getAllPrice() {
        var typeValue=$('.prepaids').val();
        var typeText=$('.prepaids').text();
        var typeValue2=$('.prepaids2').val();
        var typeText2=$('.prepaids2').text();

        var total_guige_two=parseFloat($('#total_guige_two').val());
        var cunchurightonechild=parseFloat($('#cunchurightonechild').val());
        var cunchurightfivechild=parseFloat($('#cunchurightfivechild').val());

        if(total_guige_two==15894&&cunchurightonechild!=0){
            $("#tx_price").text("￥9600.00");
        }if(total_guige_two==19056&&cunchurightfivechild!=0){
            $("#tx_price").text("￥22656.00");
        }

        if(typeValue==1&&typeText=="计算独享"){
            $("#tx_price").text("无此规格");
            $("#ali_price").text("无此规格");
            var total_guige_one=parseFloat($('#total_guige_one').val());
            var  total_brand_d=parseFloat($('#total_brand_d').val());
            var cunchudanone=parseFloat($('#cunchudanone').val());
            var cunchudantwo=parseFloat($('#cunchudantwo').val());
            var cunchudanthree=parseFloat($('#cunchudanthree').val());

            var cunchudanonechild=parseFloat($('#cunchudanonechild').val());
            var cunchudantwochild=parseFloat($('#cunchudantwochild').val());
            var cunchudanthreechild=parseFloat($('#cunchudanthreechild').val());
            $("#cpu_price").text("￥"+(cunchudanthreechild+cunchudantwochild+cunchudanonechild+total_guige_one+total_brand_d+cunchudanone+cunchudantwo +cunchudanthree).toFixed(2));

            $("#allprice").text("￥"+(cunchudanthreechild+cunchudantwochild+cunchudanonechild+total_guige_one+total_brand_d+cunchudanone+cunchudantwo +cunchudanthree).toFixed(2));
        }
        else if(typeValue2==1&&typeText2=="计算存储独享"){
            var total_guige_two=parseFloat($('#total_guige_two').val());

            var total_brand_a=parseFloat($('#total_brand_a').val());

            var a= parseFloat($('#cunchurightone').val());
            var b= parseFloat($('#cunchurighttwo').val());
            var c=parseFloat($('#cunchurightthree').val());
            var d=parseFloat($('#cunchurightfore').val());
            var e=parseFloat($('#cunchurightfive').val());



            var f= parseFloat($('#cunchurightonechild').val());
            var g=parseFloat($('#cunchurighttwochild').val());
            var h= parseFloat($('#cunchurightthreechild').val());

            var t= parseFloat($('#cunchurightforechild').val());
            var q=parseFloat($('#cunchurightfivechild').val());

            $("#cpu_price_two").text("￥"+(total_guige_two+total_brand_a+a+b+c+d+e+f+g+h+t+q).toFixed(2));

            $("#allprice").text("￥"+(total_guige_two+total_brand_a+a+b+c+d+e+f+g+h+t+q).toFixed(2));
        }

    }

    $('.checkInfo_right').click(function () {
        var openId=$('#openId').val();
        //VCPU
        var title;
        var tatilStat;
        var vCPU;
        var tallcunchu;
        var typeValue=$('.prepaids').val();
        var typeText=$('.prepaids').text();
        var typeValue2=$('.prepaids2').val();
        var typeText2=$('.prepaids2').text();


        if(typeValue==1&&typeText=="计算独享"){
            title="专属云-计算独享";
            vCPU=$('#guige_band_one').text()+"M";
            tatilStat=$('#guige_count_one').text();
            tallcunchu=$('#guige_type_top_name').text();
        }
        else if(typeValue2==1&&typeText2=="计算存储独享"){
            title="专属云-计算存储独享";
            vCPU=$('#guige_band_two').text()+"M";;
            tatilStat=$('#guige_count_two').text();
            tallcunchu=$('#guige_type_two_name').text();
        }
        //三个价格
        var aliprice=$('#ali_price').text();
        var txprice=$('#tx_price').text();
        var allprice=$('#allprice').text();
        /*if(openId==null){
            alert("添加失败,请重新打开应用");
            return false;
        }*/
        if(aliprice=="无此规格"){
            aliprice=0;
        }
        else {
            aliprice=aliprice.substring(1);
        }
        if(txprice=="无此规格"){
            txprice=0;
        }
        else {
            txprice=txprice.substring(1);
        }
        allprice=allprice.substring(1);

        var data1 = {
            cpuAndMem:tatilStat,
            meMory:'',
            stat:vCPU,
            brandNum:tallcunchu,
            ali_price:aliprice,
            tx_price:txprice,
            all_price:allprice,
            productTypeId:3,
            productName:title,
            oneKey:'计算单元',
            twoKey:'带宽',
            threeKey:'存储单元',
            disCount:'1',
            oneImage:'yunzhuji-one',
            twoImage:'yunzhuji-two',
            threeImage:'list_icon7'
            /*discount:''*/
        }
        $.post("/takeList/"+openId+"/",data1,function(data){
            if(data.type=="success"){
                layer.msg(data.msg);
            }
        });
    });


</script>


</body>

</html>
